﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ex="clr-namespace:UploadClient.View">

    <BitmapImage x:Key="windowIcon" UriSource="/UploadClient;component/media/box_upload_48.ico"/>
    <BitmapImage x:Key="search" UriSource="/UploadClient;component/media/search_48.png"/>
    <BitmapImage x:Key="box" UriSource="/UploadClient;component/media/box_48.png"/>
    <BitmapImage x:Key="cancel" UriSource="/UploadClient;component/media/cancel_48.png"/>
    <BitmapImage x:Key="spanner" UriSource="/UploadClient;component/media/spanner_48.png"/>
    <BitmapImage x:Key="de" UriSource="/UploadClient;component/media/Language/German.png"/>
    <BitmapImage x:Key="eng" UriSource="/UploadClient;component/media/Language/English.png"/>
    <BitmapImage x:Key="fr" UriSource="/UploadClient;component/media/Language/France.png"/>
    <BitmapImage x:Key="esp" UriSource="/UploadClient;component/media/Language/Spain.png"/>
    
    <Style x:Key="CopyProgressBar" TargetType="ProgressBar">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Border BorderBrush="#BBC6C4" BorderThickness="1" CornerRadius="5" Padding="1">
                        <Grid x:Name="PART_Track" >
                            <Rectangle x:Name="PART_Indicator" HorizontalAlignment="Left" Fill="#A5B2B0" RadiusX="5" RadiusY="5"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Storyboard x:Key="shrink">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
            <SplineDoubleKeyFrame KeyTime="0:0:0.4" Value="100" KeySpline="0.54,0.27,0.38,0.69"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="grow">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(FrameworkElement.Height)">
            <SplineDoubleKeyFrame KeyTime="0:0:0.6" Value="220" KeySpline="0.54,0.27,0.38,0.69"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Style x:Key="buttonStyle" TargetType="{x:Type Button}">
        <Setter Property="IsEnabled" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate >
                    <Image x:Name="PART_img" Source="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                              Path=(ex:ButtonExtension.DefaultImageSource)}"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="PART_img" Property="Source" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                          Path=(ex:ButtonExtension.MouseOverImageSource)}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="PART_img" Property="Source" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, 
                                          Path=(ex:ButtonExtension.DisabledImageSource)}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="starButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="IsEnabled" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Image x:Name="PART_img" Height="28" Width="28" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image.Style>
                            <Style TargetType="{x:Type Image}">
                                <Setter Property="Source" Value="/UploadClient;component/media/star_off_48.png" />
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Source" Value="/UploadClient;component/media/star_48.png" />
                                    </Trigger>
                                    <DataTrigger Binding="{Binding Path=IsFavourite}" Value="True">
                                        <Setter Property="Source" Value="/UploadClient;component/media/star_48.png" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="buttonStyleNew">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Image Source="{TemplateBinding Content}" Height="25" Width="25" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value="0.5"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsEnabled" Value="true"/>
                    <Condition Property="IsMouseOver" Value="true"/>
                </MultiTrigger.Conditions>
                <Setter Property="Effect" >
                    <Setter.Value>
                        <DropShadowEffect Opacity="0.8"/>
                    </Setter.Value>
                </Setter>
            </MultiTrigger>
        </Style.Triggers>
    </Style>


</ResourceDictionary>